import { S } from '../../s';
import { IPSDEDRCtrlItem } from './ipsdedrctrl-item';
import { IPSDEDRTab } from './ipsdedrtab';
import { IPSDEDRTabPage } from './ipsdedrtab-page';
import { PSDEDRCtrlImpl } from './psdedrctrl-impl';

export class PSDEDRTabImpl extends PSDEDRCtrlImpl implements IPSDEDRTab {
  protected psdedrctrlitems: IPSDEDRCtrlItem[];
  getPSDEDRCtrlItems(): IPSDEDRCtrlItem[] | null {
    return (
      this.psdedrctrlitems ||
      (this.psdedrctrlitems = this.fillChildListModel(
        this.M.getPSDEDRCtrlItems,
        S._a0,
      ) as IPSDEDRCtrlItem[])
    );
  }

  findPSDEDRCtrlItem(objKey: any): IPSDEDRCtrlItem | null {
    return this.getPSModel5(
      S._a0,
      this.getPSDEDRCtrlItems(),
      objKey,
    ) as IPSDEDRCtrlItem;
  }

  protected psdedrtabpages: IPSDEDRTabPage[];
  getPSDEDRTabPages(): IPSDEDRTabPage[] | null {
    return (
      this.psdedrtabpages ||
      (this.psdedrtabpages = this.fillChildListModel(
        this.M.getPSDEDRTabPages,
        S._a2,
      ) as IPSDEDRTabPage[])
    );
  }

  findPSDEDRTabPage(objKey: any): IPSDEDRTabPage | null {
    return this.getPSModel5(
      S._a2,
      this.getPSDEDRTabPages(),
      objKey,
    ) as IPSDEDRTabPage;
  }
  get cls(): string {
    return 'PSDEDRTabImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._220 || cls == S._221) return true;
    return super.instanceof(cls);
  }
}
